package org.ch00.test01;

import java.util.Random;

/*
 *
 *@author XCH
 *@date 2025 - 03 - 03
 *
 */
public class Zoon {
    public String name;

    public Zoon(String name) {
        this.name = name;
    }

    public Zoon() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void run(){
        System.out.println("开枪");
        Random random = new Random();
        int i =random.nextInt(2)+1;
        if (i <=2){
            System.out.println("死了");
        }else {
            System.out.println("跑了");
        }

    }
}
